#ifndef SECONDSCREENHANDLER
#define SECONDSCREENHANDLER

#include <uguiconfig.h>
#include <uguitools.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <stdint.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/ioctl.h>
#include <sys/mman.h>
#include <linux/fb.h>
#include <QString>
#include <QMap>

#define MIN(x,y)        ((x)>(y)?(y):(x))
#define MAX(x,y)        ((x)>(y)?(x):(y))

#define RED16     0xf800
#define GREEN16   0x07e0
#define BLUE16    0x001f

#define RED24     0x00ff0000
#define GREEN24   0x0000ff00
#define BLUE24    0x000000ff

#define R_MAX16	  32
#define G_MAX16	  64
#define B_MAX16	  32

#define R_MAX24	  256
#define G_MAX24	  256
#define B_MAX24   256

#define GRAY_16	  32
#define GRAY_24	  256

#define ROW_16	  4
#define COL_16	  8

#define ROW_24	  16
#define COL_24	  16

//void draw_dot (PFBDEV pFbdev, POINT p, void *color);
//void draw_line(PFBDEV pFbdev, POINT p1, POINT p2, void *color);
//void draw_polygon(PFBDEV pFbdev, uint32_t num, PPOINT array, void *color);
//void draw_triangle(PFBDEV pFbdev, POINT p1, POINT p2, POINT p3, void *color);
//void draw_circle(PFBDEV pFbdev, POINT center, uint32_t radius, void *color);
//void draw_parabola_x(PFBDEV pFbdev, POINT center, int a, void *color);
//void draw_parabola_y(PFBDEV pFbdev, POINT center, int a, void *color);

//void pset_draw_dot (UG_S16 x,UG_S16 y, UG_U32  color);
int SecondGUI_Test(void);

void WriteText(QString text);
void WriteText2(QString text);
void WriteLine(QString name, QString price, int index);
void WriteQMap(QMap<QString, QString> tabList);
void Clear();
void TestWrite();

#endif // SECONDSCREENHANDLER

